<style tyle="text/css">
  .modal-lg {
    width: 60%;
  }
</style>
<div class="modal-header">
    <h4 class="modal-title">设置加价金额</h4>
</div>
<div class="modal-body">

    <form name="form" class="form-horizontal ng-pristine ng-valid-required">
      <div class="form-group" ng-if="!flag">
        <label class="col-lg-3 control-label">加价金额:</label>
        <div class="col-lg-6">
          <input type="number" class="form-control" ng-model="obj.agreement_money">
        </div>
      </div>
      <div class="form-group" ng-if="!flag">
        <label class="col-lg-3 control-label">备注:</label>
        <div class="col-lg-6">
          <textarea class="form-control" rows="3" placeholder="描述信息在100字以内.." ng-model="obj.remark"></textarea>
        </div>
      </div>

      <div class="form-group" ng-if="flag">
        <label class="col-lg-3 control-label">选择旅行社:</label>
        <div class="col-lg-5">
          <ui-select ng-model="search.office" theme="bootstrap">
            <ui-select-match placeholder="选择景区...">{{$select.selected.name}}</ui-select-match>
            <ui-select-choices repeat="office in obj | filter: {'name': $select.search}">
              <span ng-bind-html="office.name | highlight: $select.search"></span>
              【<span ng-bind-html="office.code | highlight: $select.search"></span>】
            </ui-select-choices>
          </ui-select>
        </div>
        <label class="col-lg-3">
          <button class="btn btn-success" type="button" ng-click="add()">添加</button>
        </label>
      </div>
    </form>
    <div class="panel panel-default" ng-if="flag && sel_list.length > 0">
        <table class="table table-striped table-bordered table-condensed tree_table">
          <thead>
            <tr>
              <th class="col-md-1 text-center">运营商</th>
              <th class="col-md-1 text-center">旅行社名称</th>
              <th class="col-md-1 text-center">旅行社编号</th>
              <th class="col-md-1 text-center">加价金额(元)</th>
              <th class="col-md-1 text-center">备注</th>
              <th style="width: 3%"></th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="info in sel_list">
              <td class="text-center">{{officeInfo.name}}</td>
              <td class="text-center">{{info.target_company_name}}</td>
              <td class="text-center">{{info.target_company_code}}</td>
              <td class="text-center"><input type="number" class="form-control" style="height:30px" ng-model="info.agreement_money"></td>
              <td class="text-center"><input type="text" class="form-control" style="height:30px" ng-model="info.remark"></td>
              <td class="text-center">
                <button class="btn btn-rounded btn-sm btn-icon btn-danger" ng-click="remove($index)">
                  <i class="fa fa-times"></i>
                </button>
              </td>
            </tr>
          </tbody>
        </table>
    </div>
    

</div>
<div class="modal-footer">
    <button class="btn btn-success" type="button" ng-click="ok()">确定</button>
    <button class="btn btn-danger" type="button" ng-click="cancel()">取消</button>
</div>
